<template>
  <div>
    <ul>
      <li
        v-for="(i, item) in arr"
        :key="item"
        @click="huan(item)"
        :class="{ yanse: item == kong }"
      >
        {{ i }}
      </li>
    </ul>
  </div>
</template>
<style >
* {
  margin: 0;
  padding: 0;
}

ul li {
  list-style: none;
}

.dbgbox {
  margin: 100px auto;
}

.zdwbox {
  width: 234px;
  background: rgba(0, 0, 0, 0.5);
  float: left;
}

ul {
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding-left: 200px;
}

li {
  overflow: hidden;
  height: 42px;
  width: 40%;

  padding-left: 30px;
  box-sizing: border-box;
  line-height: 42px;
  background: pink;
}

li img {
  margin-top: 12px;
  width: 18px;
  height: 18px;
  padding-right: 10px;
  float: right;
}

.active {
  background: #ff5500;
}

span {
  color: #ffffff;
  font-size: 14px;
  padding-top: 12px;
}

section {
  width: 500px;
  height: 420px;
  float: right;
  position: relative;
}

section div {
  display: none;
  text-align: center;
  line-height: 420px;
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  height: 420px;
  background: white;
}

section div:nth-child(1) {
  display: block;
}

.active {
  border: 1px solid #000;
}
.yanse {
  background: blue;
}
</style>
<script>
export default {
  data() {
    return {
      arr: [1, 2, 3, 4, 5],
      kong: 0,
    };
  },
  methods: {
    huan(item) {
      this.kong = item;
    },
  },
};
</script>
